<!DOCTYPE html>
<html>
	<head>
		<!--
			创建人：睢小玉
			修改时间：2019-8-3
			主页
		-->
		<meta charset="utf-8" />
		<title>登录界面</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
		
		<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>

		<link href="bootstrap-3.3.7-dist/css/bootstrap.min.css"rel="stylesheet"/>
		<link href="bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" />
		<link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap-theme.css"/>
        <link rel="stylesheet" href="css/reset.css">
        <link rel="stylesheet" href="css/style.css">
        <script src="js/jquery-1.8.2.min.js"></script>
        <script type="text/javascript" src="js/jquery-3.4.0.min.js" ></script>
        <script type="application/javascript">
        	// 初始化相关事件的控件
			$(function(){
				// 点击添加按钮事件
				$("#submituser").click(function(){
					// alert("提交按钮事件");
					//获取文本框输入的值
					var username=$("#txtusernumber").val();
					var pwd=$("#txtpwd").val();
					alert(username+"---"+pwd);
					//2.读取json格式的数据
					$.getJSON("Json/login.json",function(data){
						// 读取请求到的json数据
						console.log(data);
						if(username==data.name && pwd==data.pwd){
							window.location.href="gongying.html";
						}
						else{
							alert("账号或密码错误，重输");
							$("#txtusernumber").val("");
							$("#txtpwd").val("");
						}
					})
				});
			});
        </script>
	</head>
	<body>
		<div class="page-container">
            <h1>电厂业务服务平台登入</h1>
            <form action="" method="post">
                <input type="text" name="usernumber" id="txtusernumber" class="username" placeholder="Username">
                <input type="password" name="pwd" id="txtpwd" class="password" placeholder="Password">
                <button type="submit"  name="submituser" id="submituser" >Sign me in</button>
                
            </form>
            
        </div>
        
        <!-- Javascript -->
        <script src="js/jquery-1.8.2.min.js"></script>
        <script src="js/supersized.3.2.7.min.js"></script>
        <script src="js/scripts.js"></script>
        <script src="js/supersized-init.js"></script>
		<div class="error"><span>+</span></div>

		
	</body>
</html>
